package com.yuanchu.store.client;

import com.yuanchu.store.dto.TradeTrendVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;
import java.util.Map;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-01-24 10:20
 */
@FeignClient(value = "yuanchu-search", fallbackFactory = FeignOrderServiceClientFallbackFactory.class)
public interface FeignOrderClient {

    /**
     * 交易概况
     * @return
     */
    @GetMapping("/search/order/order/sales/overview")
    Map<String, Object> queryOverview();

    /**
     * 订单统计
     * @return
     */
    @GetMapping("/search/order/order/count/statistic")
    Map<String, Object> queryConsumption();


    /**
     * 待付款订单数
     * @return
     */
    @GetMapping("/search/order/order/count/pending")
    Map<String, Object> queryPending();



    /**
     * 近七日交易数据
     * @return
     */
    @GetMapping("/search/order/order/count/trend")
    TradeTrendVO getTradeTrend();

    /**
     * 订单销量
     * @return
     */
    @GetMapping("/search/order/order/sales")
    List<Map<String, Object>> queryOrderSales();

    /**
     * 订单总数
     * @return
     */
    @GetMapping("/search/order/order/pay/count")
    Map<String, String> queryPayOrderCount();
}
